cmake_minimum_required(VERSION 3.5)

project( Demo )
set(OpenCV_DIR /home/pi/opencv-project/opencv-4.5.3/_build)
find_package( OpenCV REQUIRED )

include_directories( ${OpenCV_INCLUDE_DIRS} ./include 
    ./cjson
    ./tn901
    ./alilink
	PRIVATE
	./MQTTClient-C/src
    ./MQTTClient-C/src/linux
    ./MQTTPacket/src
	#./linux-draw/includes/libavcodec
	#./linux-draw/includes/libavfilter
	#./linux-draw/includes/libavutil
	#./linux-draw/includes/libswresample
	#./linux-draw/includes/libavdevice
	#./linux-draw/includes/libavformat
	#./linux-draw/includes/libjpeg
	#./linux-draw/includes/libswscale
./linux-draw/includes
./linux-draw
)

aux_source_directory(./source SRC_DIR)
aux_source_directory(./linux-draw LINUX_DRAW)
aux_source_directory(./cjson CJSON_DIR)
aux_source_directory(./tn901 TN901_DIR)
aux_source_directory(./alilink ALILINK_DIR)

link_directories("/home/pi/opencv-project/RaspberryPi_FaceRecognition/1.Firmware/linux-draw/libs/linux")
add_executable( Demo ${SRC_DIR} ${LINUX_DRAW} ${CJSON_DIR} ${TN901_DIR} ./alilink/aiot_mqtt_sign.c ./alilink/aiot_c.cpp)
MESSAGE(STATUS "this var key = ${LINUX_DRAW}")
target_link_libraries( Demo ${OpenCV_LIBS}
jpeg
avformat
avcodec
avutil
swscale
avdevice
swresample
m
z
bz2
pthread
wiringPi
paho-embed-mqtt3cc
paho-embed-mqtt3c
)
target_compile_definitions(Demo PRIVATE MQTTCLIENT_PLATFORM_HEADER=MQTTLinux.h)
